package object;

public class EqualsDemo {
    public static void main(String[] args) {
        String s1 =new String("hello world");
        String s2 = new String("hello world");
        System.out.println(s1.equals(s2) ); //true

        StringBuilder sb1 = new StringBuilder("hello world");
        StringBuilder sb2 = new StringBuilder("hello world");
        System.out.println(sb1.equals(sb2)); //false

        /*
        Point p1 = new Point(10, 20);
        Point p2 = new Point(10, 20);
        System.out.println(p1 == p2);  //false
        System.out.println(p1.equals(p2)); //true

         */
    }
}
